}
terminit(portname);
+ if (!mkshort_handle) {
+ mkshort_handle = mkshort_new_handle();
+ }
if (!noack)
mag_handon();
fstat(fileno(magfile_out), &sbuf);
is_file = S_ISREG(sbuf.st_mode);
#endif
- mkshort_handle = mkshort_new_handle();
+ if (!mkshort_handle) {
+ mkshort_handle = mkshort_new_handle();
+ }
if (is_file) {
magfile_out = fopen(portname, "w+b");
if (magfile_out == NULL) {